package ev.operator;//need to add this line

import java.util.Random;

public class Cycle implements Crossover{
	public int[] cross(int[] a, int[] b){
		Random r=new Random();
		int position=r.nextInt(a.length);
		int temp;
		for(int i=position;i<a.length;i++){
			temp=a[i];
			a[i]=b[i];
			b[i]=temp;
		}
		return a;
	}
		
	public	boolean[] cross(boolean[] a, boolean[] b){		
		Random r=new Random();
		int position=r.nextInt(a.length);
		boolean temp;
		for(int i=position;i<a.length;i++){
			temp=a[i];
			a[i]=b[i];
			b[i]=temp;
		}
		return a;
	}
	
}
